{template 'admin','header'}
<form action="{URL}" method="POST"  onsubmit="return r_submit(this);">
<table class="table_form">
<caption>组用户角色</caption>
<tr><th width="20%"><strong>用户</strong></th><td>{$info['username']}/{if empty($info['truename'])}'未填写'{else}{$info['truename']}{/if}</td></tr>
<tr><th><strong>角色</strong></th>
<td><input type="radio" onclick="document.getElementById('roles').style.display='none'" name="r_flag" {if sizeof($roles)==0}checked{/if} value="0">默认角色&nbsp;
<input type="radio" onclick="document.getElementById('roles').style.display=''" name="r_flag" {if sizeof($roles)>0}checked{/if} value="1">自定义角色<br/>
<div id="roles" style="display:{if sizeof($roles)==0}none;{else}{/if}">
<input type="hidden" name="u_id" value="{$u_id}">
<input type="hidden" name="gid" value="{$gid}">
{loop $role_list $k=>$r}
<input type="checkbox" name="roles[]" {if in_array($k,$roles)==true}checked{/if} value="{$k}">{$r}
{/loop}
</div></td></tr>
<tr><th></th><td><input type="submit" class="button_style" value="确定">&nbsp;<input type="button" class="button_style" onclick="self.location='{urldecode($forward)}'" value="返回"></td></tr>
</table>
</form>
{template 'admin','footer'}